package com.ruoyi.association.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.association.domain.SysAssociationMember;

/**
 * 协会会员关联Mapper接口
 * 
 * @author ruoyi
 * @date 2025-01-27
 */
public interface SysAssociationMemberMapper extends BaseMapper<SysAssociationMember>
{
    /**
     * 查询协会会员关联
     * 
     * @param id 协会会员关联主键
     * @return 协会会员关联
     */
    public SysAssociationMember selectSysAssociationMemberById(Long id);

    /**
     * 查询协会会员关联列表
     * 
     * @param sysAssociationMember 协会会员关联
     * @return 协会会员关联集合
     */
    public List<SysAssociationMember> selectSysAssociationMemberList(SysAssociationMember sysAssociationMember);

    /**
     * 新增协会会员关联
     * 
     * @param sysAssociationMember 协会会员关联
     * @return 结果
     */
    public int insertSysAssociationMember(SysAssociationMember sysAssociationMember);

    /**
     * 修改协会会员关联
     * 
     * @param sysAssociationMember 协会会员关联
     * @return 结果
     */
    public int updateSysAssociationMember(SysAssociationMember sysAssociationMember);

    /**
     * 删除协会会员关联
     * 
     * @param id 协会会员关联主键
     * @return 结果
     */
    public int deleteSysAssociationMemberById(Long id);

    /**
     * 批量删除协会会员关联
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysAssociationMemberByIds(Long[] ids);

    /**
     * 根据协会ID删除关联会员
     * 
     * @param associationId 协会ID
     * @return 结果
     */
    public int deleteSysAssociationMemberByAssociationId(Long associationId);

    /**
     * 根据协会ID查询关联会员列表
     * 
     * @param associationId 协会ID
     * @return 会员列表
     */
    public List<SysAssociationMember> selectMembersByAssociationId(Long associationId);

    /**
     * 根据会员ID查询关联协会列表
     * 
     * @param membersId 会员ID
     * @return 协会列表
     */
    public List<SysAssociationMember> selectAssociationsByMembersId(Long membersId);

    /**
     * 统计协会会员数量
     * 
     * @param associationId 协会ID
     * @return 结果
     */
    public int countMembersByAssociationId(Long associationId);
}
